package com.emr.module.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.emr.module.mapper.EmergencyMapper;
import com.emr.module.domain.Emergency;
import com.emr.module.service.IEmergencyService;
import com.emr.common.support.Convert;

/**
 * 临床医疗组 服务层实现
 * 
 * @author emr
 * @date 2019-02-28
 */
@Service
public class EmergencyServiceImpl implements IEmergencyService 
{
	@Autowired
	private EmergencyMapper emergencyMapper;

	/**
     * 查询临床医疗组信息
     * 
     * @param id 临床医疗组ID
     * @return 临床医疗组信息
     */
    @Override
	public Emergency selectEmergencyById(Integer id)
	{
	    return emergencyMapper.selectEmergencyById(id);
	}
	
	/**
     * 查询临床医疗组列表
     * 
     * @param emergency 临床医疗组信息
     * @return 临床医疗组集合
     */
	@Override
	public List<Emergency> selectEmergencyList(Emergency emergency)
	{
	    return emergencyMapper.selectEmergencyList(emergency);
	}
	
    /**
     * 新增临床医疗组
     * 
     * @param emergency 临床医疗组信息
     * @return 结果
     */
	@Override
	public int insertEmergency(Emergency emergency)
	{
	    return emergencyMapper.insertEmergency(emergency);
	}
	
	/**
     * 修改临床医疗组
     * 
     * @param emergency 临床医疗组信息
     * @return 结果
     */
	@Override
	public int updateEmergency(Emergency emergency)
	{
	    return emergencyMapper.updateEmergency(emergency);
	}

	/**
     * 删除临床医疗组对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteEmergencyByIds(String ids)
	{
		return emergencyMapper.deleteEmergencyByIds(Convert.toStrArray(ids));
	}
	
}
